"""day2 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,re_path
from django.views.static import serve
from django.conf import settings
from app03.views import deant,deantUser,admins,account,order,travel,people

urlpatterns = [
    # path('admin/', admin.site.urls),
    re_path(r'^media/(?P<path>.*)$',serve,{'document_root':settings.MEDIA_ROOT},name='media'),
    # 员工薪资管理系统
    #部门管理
    path( 'deant/list/', deant.deant_list ),
    path( 'deant/add/', deant.deant_add ),
    path( 'deant/<int:nid>/edit/', deant.deant_edit ),
    path( 'deant/delete/', deant.deant_delete ),
    path('deant/upload/',deant.deant_upload),

    #用户管理
    path( 'deantUser/list/', deantUser.deantUser_list ),
    path( 'deantUser/add/', deantUser.deantUser_add ),
    path( 'deantUser/<int:sid>/edit/', deantUser.deantUser_edit ),
    path( 'deantUser/delete/', deantUser.deantUser_delete ),

    #管理员账户
    path('admin/list/',admins.admin_list),
    path('admin/add/',admins.admin_add),
    path( 'admin/<int:nid>/edit/',admins.admin_edit ),
    path( 'admin/<int:nid>/delete/',admins.admin_delete),
    path( 'admin/<int:nid>/clear/', admins.admin_clear),

    #用户登录
    path('login/',account.login_dl),
    path('logout/',account.logout),
    path('image/code/',account.image_code),
    path('login/zhuc/',account.login_zc),

    #请假管理
    path('order/list/',order.order_list),
    path('order/add/',order.order_add),
    path('order/edit/',order.order_edit),
    path('order/editGet/',order.order_editGet),
    path('order/delete/',order.order_delete),

    #旅游出行
    path('travel/list/',travel.travel_list),
    path('travel/add/',travel.travel_add),
    path('travel/<int:nid>/edit/',travel.travel_edit),
    path('travel/<int:nid>/delete/',travel.travel_delete),

    #上传请假表
    path('order/upload/',order.order_upload),

    #个人信息
    path('people/list/',people.people_list),

]

